home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
swagd_f.zip
/
FILES.SWG
/
0002_FILATTR2.PAS.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-05-28
|
627b
|
34 lines
{
JOE DICKSON
> I was wondering if someone could tell me how to change the Time and Date
> and maybe the Attribute of a File? Lets say I want to Change:
> FileNAME.EXT 1024 01-24-93 12:33p A to:
> FileNAME.EXT 1024 01-01-93 01:00a AR
}
Program change_sample_Files_attribs;
Uses
Dos;
Var
f : File;
attr : Word;
time : LongInt;
DT : datetime;
begin
assign(f, 'FileNAME.EXT');
DT.year := 93;
DT.month := 1;
DT.day := 1;
dt.hour := 1;
dt.min := 0;
dt.sec := 0;
packtime(dt, time);
attr := ReadOnly;
setftime(f, time);
setfattr(f, attr);
end.